# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname="fdm"
pkgver=2.1
pkgrel=0
pkgdesc="A simple lightweight tool of fetching, filtering and delivering emails"
url="https://github.com/nicm/fdm"
arch="all"
license="ISC"
depends=""
makedepends="tdb-dev openssl-dev zlib-dev bsd-compat-headers pcre-dev
	automake autoconf libtool"
subpackages="$pkgname-doc"
source="https://github.com/nicm/fdm/releases/download/$pkgver/fdm-$pkgver.tar.gz"
bbuuilddir="$srcdir/fdm-$pkgver"

prepare() {
	default_prepare
	autoreconf -vif
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--enable-pcre
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
6a864048e1f25eedbb6af86451b258678b91e3c225b3b065a1aeb043f125405dfa109a0fbd77363394e14050053c7d81093d5b9d6a2dd155fb00dc98455028b4  fdm-2.1.tar.gz
"
